package zlx.springcloud.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import zlx.commons.entities.CommonResult;
import zlx.commons.entities.Payment;
import zlx.springcloud.service.PaymentFeignService;

import javax.annotation.Resource;

@RestController
public class PaymentFeignController {
    @Resource
    private PaymentFeignService paymentFeignService;


    @GetMapping(value = "/comsumer/payment/get/{id}")
    public CommonResult<Payment> getPayment(@PathVariable("id") Long id){
       return paymentFeignService.getPayment(id);
    }
    @GetMapping(value = "/comsumer/payment/feign/timeout")
    public String paymentTimeout(){
        return paymentFeignService.paymentTimeout();
    }
}
